	package com.rm2pt.generator.springboot.LabManage.entity;
	
	import org.hibernate.annotations.Fetch;
	import org.hibernate.annotations.FetchMode;
	import com.fasterxml.jackson.annotation.JsonBackReference;
	import com.fasterxml.jackson.annotation.JsonIgnore;
	import javax.persistence.FetchType;
	import java.util.ArrayList;
	import javax.persistence.OneToMany;
	import javax.persistence.OneToOne;
	import javax.persistence.CascadeType;
	import java.util.Date;
	import java.util.List;
	import java.io.Serializable;
	import javax.persistence.Entity;
	import javax.persistence.Transient;
	import javax.persistence.GeneratedValue;
	import javax.persistence.GenerationType;
	import javax.persistence.Id;
	import javax.persistence.JoinColumn;
	import javax.persistence.ManyToOne;
	import com.fasterxml.jackson.annotation.ObjectIdGenerators;
	import com.fasterxml.jackson.annotation.JsonIdentityInfo;
	
	@Entity
	public class Apply extends BaseEntity {
		
		/* all primary attributes */
		private String belongStudent;
		public String getBelongStudent() {
			return belongStudent;
		}
		public void setBelongStudent(String BelongStudent) {
			this.belongStudent = BelongStudent;
		}	
			
		private Integer applyType;
		public Integer getApplyType() {
			return applyType;
		}
		public void setApplyType(Integer ApplyType) {
			this.applyType = ApplyType;
		}	
			
		private String aimId;
		public String getAimId() {
			return aimId;
		}
		public void setAimId(String AimId) {
			this.aimId = AimId;
		}	
			

		
		@ManyToOne(targetEntity=Student.class)
		@JoinColumn(name="applytostudent_realid",referencedColumnName="realid")
		private Student applytoStudent;
				
		public Student getApplytoStudent() {
			return applytoStudent;
		}
				
		public void setApplytoStudent(Student ApplytoStudent) {
			this.applytoStudent = ApplytoStudent;
		}
		
		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Apply other = (Apply) obj;
			if (!this.getRealid().equals(other.getRealid()))
				return false;
			else
				return true;
		}
	}
